package com.pay.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pay.entity.PaymentChannelDO;
import com.pay.mapper.PaymentChannelMapper;
import com.pay.service.open.api.PaymentChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 周益和
 * @ClassName PaymentChannelServiceImpl
 * @qq 1552951165
 */
@Service
public class PaymentChannelServiceImpl implements PaymentChannelService {
    @Autowired
    private PaymentChannelMapper paymentChannelMapper;
    
    /**
     * 根据渠道id查询渠道信息
     *
     * @param channelId
     * @return
     */
    @Override
    public PaymentChannelDO getByChannelIdInfo(String channelId) {
        QueryWrapper<PaymentChannelDO> paymentChannelDOQueryWrapper = new QueryWrapper<>();
        paymentChannelDOQueryWrapper.eq("CHANNEL_ID", channelId);
        PaymentChannelDO paymentChannelDO = paymentChannelMapper.selectOne(paymentChannelDOQueryWrapper);
        return paymentChannelDO;
    }
}
